﻿using System;
using System.Globalization;
using System.Net;
using Microsoft.TeamFoundation.Client;
using Microsoft.TeamFoundation.Server;

namespace CodePlex.TeamFoundation.Adapters
{
  public interface ITeamFoundationServer
  {
    //Constructors don't belong in an interface
    //TeamFoundationServer(string name);
    //TeamFoundationServer(string name, ICredentials credentials);
    //TeamFoundationServer(string name, ICredentialsProvider credentialsProvider);
    //TeamFoundationServer(string name, ICredentials credentials, ICredentialsProvider credentialsProvider);

    // Cannot mock static methods
    //public static bool operator !=(TeamFoundationServer tfs1, TeamFoundationServer tfs2);
    //public static bool operator ==(TeamFoundationServer tfs1, TeamFoundationServer tfs2);
    //public static string ApplicationName { get; set; }

    string AuthenticatedUserDisplayName { get; }
    Identity AuthenticatedUserIdentity { get; }
    string AuthenticatedUserName { get; }
    // public static string ClientCacheDirectory { get; }
    string ClientCacheDirectoryForInstance { get; }
    // public static string ClientSettingsDirectory { get; set; }
    ICredentials Credentials { get; }
    CultureInfo Culture { get; set; }
    bool HasAuthenticated { get; }
    Guid InstanceId { get; }
    string Name { get; }
    // public static string OperationName { get; set; }
    Guid SessionId { get; }
    TimeZone TimeZone { get; set; }
    Uri Uri { get; }

    event CredentialsChangedEventHandler CredentialsChanged;

    void Authenticate();
    void Dispose();
    void EnsureAuthenticated();
    bool Equals(object obj);
    int GetHashCode();
    object GetService(Type serviceType);
    string ToString();
  }
}
